cmake_minimum_required(VERSION 3.20)

project(
  NH5Export
  VERSION 0.1.0
  LANGUAGES CXX)

set(CMAKE_CXX_STANDARD 14)

# -------------------- 创建项目库 ------------------- #
add_library(${PROJECT_NAME} SHARED NH5Export.cpp)

# --------------------- 链接库 -------------------- #
target_link_libraries(${PROJECT_NAME} PRIVATE DataStructure DBManager Algebra Logging )

import_highfive()

# --------------------- 安装 ---------------------
install(
  DIRECTORY ${PROJECT_SOURCE_DIR}
  DESTINATION include/Export/
  FILES_MATCHING
  PATTERN "*.h"
  PATTERN "UnitTest" EXCLUDE
  PATTERN "docs" EXCLUDE)

install(
  TARGETS ${PROJECT_NAME}
  ARCHIVE DESTINATION lib
  RUNTIME DESTINATION bin)
